Most indoor spaces are nowadays equipped with one or more heating and/or cooling sources. Controlling the temperature in an indoor space such as a room or a building is performed through adjustments of the sources to achieve a desired room temperature. Usually, the adjustment is performed by setting the desired room temperature and by controlling the source accordingly in an attempt to achieve the requested temperature at the source surroundings. Nevertheless, achieving the requested temperature at the source surroundings does not guarantee reaching the requested temperature in the room. Moreover, as sources are not controlled perfectly and temperatures are not reported perfectly, it may take several adjustments before reaching a room temperature that is satisfactory with respect to the requested room temperature. However, the controlling means of the sources are often battery driven. The more adjustments are performed, the more battery is consumed. This results in a shorter battery lifetime for the various controlling means of the sources. There is therefore a need for an optimized control of the heating/cooling sources, and thereby an optimized control of the temperature.